﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WordServices.HttpService;

namespace WordsOfLove.ForumPages
{
	public class ForumPost
	{
		public int Id { get; set; }
		public int UserId { get; set; }
		public string Title { get; set; }
		public string Content { get; set; }
		public DateTime CreateTime { get; set; }
		public DateTime UpdateTime { get; set; }
	}

	public class ForumPostTag
	{
		[Key, Column(Order = 0)]
		public int PostId { get; set; }
		[Key, Column(Order = 1), MaxLength(30)]
		public string Content { get; set; }
	}

	public class ForumPostLike
	{
		[Key, Column(Order = 0)]
		public int UserId { get; set; }
		[Key, Column(Order = 1)]
		public int PostId { get; set; }
	}

	public class User
	{
		public int Id { get; set; }
		public string UserName { get; set; }
		public string Password { get; set; }
	}
	public class ForumPostInfo
	{
		public int Id { get; set; }
		public int UserId { get; set; }
		public string Title { get; set; }
		public string Content { get; set; }
		public DateTime CreateTime { get; set; }
		public DateTime UpdateTime { get; set; }

		public string UserName { get; set; }
		public int LikeCount { get; set; }
		public int CommentCount { get; set; }
	}

	public class ForumComment
	{
		public int Id { get; set; }
		public int UserId { get; set; }
		public int PostId { get; set; }
		public string Content { get; set; }
		public DateTime CreateTime { get; set; }
	}

	public class ForumCommentInfo
	{
		public int Id { get; set; }
		public int UserId { get; set; }
		public int PostId { get; set; }
		public string Content { get; set; }
		public DateTime CreateTime { get; set; }

		public int LikeCount { get; set; }
		public string UserName { get; set; }
	}

	public class HttpUtilsFactory
	{
		public static HttpUtils Utils { get; set; } = new HttpUtils("https://localhost:44300");
	}
}
